package com.espirit.builder.biz;

import com.espirit.eap.manager.ModelBuilderSupport;

public abstract class VoucherBuilderSupport extends ModelBuilderSupport {
	protected static final String VOUCHERON = "voucherOn";
	protected static final String CREATEDON = "createdOn";
	protected static final String ACCTITEM = "acctItem";
	protected static final String ACCT = "acct";
	protected static final String DC = "dc";
	protected static final String AMOUNT = "amount";
	protected static final String ACCTTERM = "acctTerm";
	protected static final String DC_AMOUNT = "dcAmount";
	@Override
	public boolean init() {
		return true;
	}

	@Override
	public void buildFields() {
		super.buildFields();
		addModelField(VOUCHERON, "Voucher On", "凭证日期");
		addModelField(CREATEDON, "Created On", "创建日期");
		addModelField(ACCTITEM, "Strategy", "策略");
		addModelField(ACCT, "Acct", "科目");
		addModelField(DC, "DC", "借贷");
		addModelField(AMOUNT, "Amount", "金额");
		addModelField(DC_AMOUNT, "Amount", "金额");
		addModelField(ACCTTERM, "Acct Term", "会计期间");
	}
	
	@Override
	protected void addSearchFields() {
		super.addSearchField(convertPropertyToField(VOUCHERON));
	}
	
	@Override
	protected void addListFields() {
		addListField(convertPropertyToField(VOUCHERON, CREATEDON, ACCTITEM, DC, AMOUNT));
	}
	
	@Override
	protected void addDetailFields() {
		addDetailField(convertPropertyToField(VOUCHERON, ACCTITEM, DC, AMOUNT));
	}
	
	@Override
	protected void setDefaultLayoutButtons() {
//		addButton(FunctionButton.EXPORT);
		super.setDefaultLayoutButtons();
	}
	
	@Override
	protected void gatherExproperties() {
		exProperties.put(REQUIRED, new String[]{VOUCHERON, DC, ACCTITEM});
	}
	
}
